// SMTopTabBar.h
#import <UIKit/UIKit.h>
@protocol SMTopTabBarDelegate <NSObject>
- (void)topTabBarDidSelectIndex:(NSInteger)index;
@end
@interface SMTopTabBar : UIView
@property(nonatomic, weak) id<SMTopTabBarDelegate> delegate;
@property(nonatomic, assign, readonly) NSInteger selectedIndex;
- (instancetype)initWithTitles:(NSArray<NSString *> *)titles;
- (void)setSelectedIndex:(NSInteger)index animated:(BOOL)animated;
@end
